package com.neusoft.databus.core.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.query.Param;

import com.neusoft.databus.common.enums.Protocol;
import com.neusoft.databus.common.model.MetricGroup;

/**
 * @author naxiang
 */
public interface MetricGroupRepository extends JpaRepository<MetricGroup, Long>, CustomizedMetricGroupRepository {

    List<MetricGroup> findByIdIn(@Param(value = "ids") List<Long> ids);

    MetricGroup findByCode(String code);

    void deleteByCode(String code);

    MetricGroup findByNameAndProtocol(String name, Protocol protocol);
}
